<?php

if (!defined('_OPTIONS_PRE')) {
    // Replace the version number of the theme on each release.
    define('_OPTIONS_PRE', '_new_options');
}

/**
 * Custom function for get an option
 */
if (!function_exists('_xin')) {
    function _xin($option = '', $default = null) {
        $options_meta = _OPTIONS_PRE;
        $options      = get_option($options_meta);
        return (isset($options[$option])) ? $options[$option] : $default;
    }
}

//加载配置文件
if (!class_exists('CSF')) {


    $options = array(
        '/plugins/codestar-framework/codestar-framework.php', //core
        '/options/admin-options.php', //admin
        '/options/metabox-options.php', //metabox
        '/options/nav-menu-options.php',
        '/options/shortcode-options.php', //shortcode
        '/options/widget-options.php', //widget
        '/options/woocommerce-options.php', //woocommerce
        '/options/type-options.php', //type options
    );

    foreach ($options as $dir) {
        require_once get_template_directory() . '/inc' . $dir;
    }
    

}
